import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '../components/Home.vue';
import Hello from '../components/HelloWorld.vue';
import Index from '../components/Index.vue';
import Father from '../components/parentandson/Father.vue';

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: Home,
    children: [
      { path: '/home/hello', component: Hello },
      { path: '/home/index', component: Index },
      { path: '/home/father', component: Father }
    ]
  }
];

const router = new VueRouter({
  routes
});

export default router;
